package cn.getech.data.development.constant;

import lombok.Getter;

/**
 * 数据接入的枚举
 *
 * @author hujz
 */
@Getter
public enum DataInto {

    input_connect_type(1, "input_connect_type", "输入设置的数据源类型"),
    input_connect_id(2, "input_connect_id", "输入设置的数据源连接"),
    input_input_content(3, "input_input_content", "输入设置的输入内容"),
    output_db_name(4, "output_db_name", "输出设置的数据仓库"),
    output_table_name(5, "output_table_name", "输出设置的数据库表"),
    output_write_model(6, "output_write_model", "输出设置的书写模式"),
//    hight_resource(7, "hight_resource", "高级设置的计算资源"),
//    hight_thread(8, "hight_thread", "高级设置的线程数"),
    hight_file_num(9, "hight_file_num", "高级设置的文件数");

    int id;
    String key;
    String value;

    DataInto(int id, String key, String value) {
        id = id;
        this.key = key;
        this.value = value;
    }

    public static DataInto ObjOf(String key) {
        if (key == null) {
            return null;
        } else {
            for (DataInto s : DataInto.values()) {
                if (s.getKey().equalsIgnoreCase(key)) {
                    return s;
                }
            }
            return null;
        }
    }
}
